<?php
/*
	用户端后台菜单
*/
defined('BY_JYA') or exit('error');
$menus=array(
	array('title'=>'商户概况','fa'=>'icon-dianpu','url'=>'jy_lianmerch/manage.index/','child'=>array(
		array('title'=>'商户概况','child'=>array(
			array('url'=>'jy_lianmerch/manage.index/','title'=>'商户概况'),
			array('url'=>'jy_lianmerch/manage.setting/','title'=>'页面设置'),
			array('url'=>'jy_merch/manage.saler/list/','title'=>'操作员管理'),
			array('url'=>'jy_merch/manage.yajin_log/list/','title'=>'押金记录'),
			array('url'=>'jy_lianmerch/manage.links/','title'=>'链接入口'),
			array('url'=>'jy_merch/manage.app_poster/','title'=>'App下载海报'),
		)),
	)),
	array('title'=>'商户商品','fa'=>'icon-cart1','url'=>'jy_merch/manage.good_list//status=1','child'=>array(
		array('title'=>'商品','child'=>array(
			array('url'=>'jy_merch/manage.good_list//status=1','title'=>'出售中'),
			array('url'=>'jy_merch/manage.good_out/','title'=>'已售罄'),
			array('url'=>'jy_merch/manage.good_list//status=0','title'=>'仓库中'),
			array('url'=>'jy_merch/manage.good_cycle/','title'=>'回收站'),
			array('url'=>'jy_merch/manage.good_verify/','title'=>'待审核'),
			array('url'=>'jy_merch/manage.good_group/','title'=>'商品分类'),
			array('url'=>'jy_merch/manage.good_package/','title'=>'商品组'),
			array('url'=>'jy_merch/manage.good_label/','title'=>'标签管理'),
			array('url'=>'jy_merch/manage.good_virtual_temp/','title'=>'虚拟卡密'),
			array('url'=>'jy_merch/manage.good_virtual_group/','title'=>'卡密分类'),
			array('url'=>'jy_merch/manage.good_virtual_set/','title'=>'卡密设置'),
		)),
	)),
	array('title'=>'商户订单','fa'=>'icon-form','url'=>'jy_merch/manage.order_list//all=1','child'=>array(
		array('title'=>'订单','child'=>array(
			array('url'=>'jy_merch/manage.order_list//all=1','title'=>'全部订单'),
			array('url'=>'jy_merch/manage.order_list//status=1','title'=>'待发货'),
			array('url'=>'jy_merch/manage.order_list//status=2','title'=>'待收货'),
			array('url'=>'jy_merch/manage.order_list//status=0','title'=>'待付款'),
			array('url'=>'jy_merch/manage.order_list//status=3','title'=>'已完成'),
			array('url'=>'jy_merch/manage.order_list//status=4','title'=>'已关闭'),
			array('url'=>'jy_merch/manage.refund/','title'=>'维权申请'),
			array('url'=>'jy_merch/manage.order_list//status=6','title'=>'维权完成'),
			array('url'=>'jy_merch/manage.order_export/','title'=>'自定义导出'),
			array('url'=>'jy_merch/manage.order_batchsend/','title'=>'批量发货'),
			array('url'=>'jy_merch/manage.order_list//status=7','title'=>'异常报备'),
			array('url'=>'jy_merch/manage.baobei/','title'=>'异常报备记录'),
			
		)),
	)),
	array('title'=>'订单核销','fa'=>'icon-wo1','url'=>'jy_merch/manage.verifylog/','child'=>array(
		array('title'=>'订单核销','child'=>array(
			array('url'=>'jy_merch/manage.verifylog/','title'=>'虚拟核销记录'),
			array('url'=>'jy_merch/manage.verifyselflog/','title'=>'取货核销记录'),
			array('url'=>'jy_merch/manage.verifygoods/','title'=>'记次时核销订单'),
			array('url'=>'jy_merch/manage.verifynumlog/','title'=>'记次时核销记录'),
		)),
	)),
	array('title'=>'店内管理','fa'=>'icon-dianpu','url'=>'jy_merch/manage.order_in/list/status=0','child'=>array(
		array('title'=>'店内订单','child'=>array(
			array('url'=>'jy_merch/manage.order_in/list/status=0','title'=>'待付款'),
			array('url'=>'jy_merch/manage.order_in/list/status=1','title'=>'待发货'),
			array('url'=>'jy_merch/manage.order_in/list/status=2','title'=>'待收货'),
			array('url'=>'jy_merch/manage.order_in/list/status=3','title'=>'已完成'),
		)),
		array('title'=>'桌台管理','child'=>array(
			array('url'=>'jy_merch/manage.table_group/','title'=>'桌台类型'),
			array('url'=>'jy_merch/manage.table/','title'=>'桌台列表'),
		)),
		array('title'=>'排号管理','child'=>array(
			array('url'=>'jy_merch/manage.queue/user/','title'=>'客人队列'),
			array('url'=>'jy_merch/manage.queue/queue/','title'=>'队列列表'),
			array('url'=>'jy_merch/manage.queue/setting/','title'=>'排号设置'),
		)),
	)),
	array('title'=>'代客下单','fa'=>'icon-wo1','url'=>'jy_merch/manage.posgoods//sendtype=2','child'=>array(
		array('title'=>'店内下单','child'=>array(
			array('url'=>'jy_merch/manage.posgoods//sendtype=2','title'=>'自提/店内下单'),
		)),
		array('title'=>'配送下单','child'=>array(
			array('url'=>'jy_merch/manage.posgoods//sendtype=1','title'=>'配送下单'),
		)),
	)),
	array('title'=>'商户营销','fa'=>'icon-gengduotupian','url'=>'jy_merch/manage.coupon_list/','child'=>array(
		array('title'=>'营销','child'=>array(
			//array('url'=>'jy_merch/manage.sale_enough/','title'=>'满额立减'),
			//array('url'=>'jy_merch/manage.sale_baoyou/','title'=>'满额包邮'),
			array('url'=>'jy_merch/manage.coupon_list/','title'=>'全部优惠券'),
			array('url'=>'jy_merch/manage.coupon_log/','title'=>'发放记录'),
			array('url'=>'jy_merch/manage.coupon_group/','title'=>'优惠券分类'),
			array('url'=>'jy_merch/manage.coupon_set/','title'=>'优惠券设置'),
			
		)),
		array('title'=>'活动','child'=>array(
			array('url'=>'jy_merch/manage.act_buyagain/','title'=>'重复购折扣'),
			array('url'=>'jy_merch/manage.act_sales/','title'=>'促销'),
			array('url'=>'jy_merch/manage.act_limit/','title'=>'限时卖'),
			array('url'=>'jy_merch/manage.act_presell/','title'=>'商品预售'),
			array('url'=>'jy_merch/manage.act_buyshow/','title'=>'买家秀'),
		)),
	)),
	array('title'=>'收银台','fa'=>'icon-dixiaofei','url'=>'jy_merch/manage.cashier//ismerch=1','child'=>array(
		array('title'=>'收银台','child'=>array(
			array('url'=>'jy_merch/manage.cashier//ismerch=1','title'=>'收银台管理'),
		)),
	)),
	array('title'=>'零售分销','fa'=>'icon-caifua','url'=>'jy_lianmerch/manage.count/','child'=>array(
		array('title'=>'总概况','child'=>array(
			array('url'=>'jy_lianmerch/manage.count/','title'=>'总概况'),
		)),
		array('title'=>'团队分销','child'=>array(
			array('url'=>'jy_merchjifee/merch.index/','title'=>'概况'),
			array('url'=>'jy_merchjifee/merch.agent/','title'=>'团队长管理'),
			array('url'=>'jy_merchjifee/merch.member/','title'=>'会员管理'),
			array('url'=>'jy_merchjifee/merch.order/','title'=>'团队长订单'),
			array('url'=>'jy_merchjifee/merch.creditlog/','title'=>'积分记录'),
			array('url'=>'jy_merchjifee/merch.goods/','title'=>'商品分润设置'),
			array('url'=>'jy_merchjifee/merch.level/','title'=>'团长等级设置'),
			array('url'=>'jy_merchjifee/merch.setting/','title'=>'基本设置'),
			//array('url'=>'jy_merchjifee/merch.page_setting/','title'=>'样式设置'),
			array('url'=>'jy_merchjifee/merch.apply_setting/','title'=>'团长申请页设置'),
			array('url'=>'jy_merchjifee/merch.poster/','title'=>'团二维码海报'),
		)),
		array('title'=>'区域代理','child'=>array(
			array('url'=>'jy_area_jifee/merch.index/','title'=>'概况'),
			array('url'=>'jy_area_jifee/merch.agent/','title'=>'区域代理管理'),
			array('url'=>'jy_area_jifee/merch.member/','title'=>'会员管理'),
			array('url'=>'jy_area_jifee/merch.order/','title'=>'区域代理订单'),
			array('url'=>'jy_area_jifee/merch.creditlog/','title'=>'积分记录'),
			array('url'=>'jy_area_jifee/merch.goods/','title'=>'商品分润设置'),
			array('url'=>'jy_area_jifee/merch.level/','title'=>'代理商等级设置'),
			array('url'=>'jy_area_jifee/merch.setting/','title'=>'基本设置'),
			//array('url'=>'jy_area_jifee/merch.page_setting/','title'=>'样式设置'),
			array('url'=>'jy_area_jifee/merch.apply_setting/','title'=>'代理商申请页设置'),
		)),
	)),
	array('title'=>'积分商城','fa'=>'icon-jifen1','url'=>'jy_creditshop/merch.index/','child'=>array(
		array('title'=>'概况','child'=>array(
			array('url'=>'jy_creditshop/merch.index/','title'=>'概况'),
		)),
		array('title'=>'参与记录','child'=>array(
			array('url'=>'jy_creditshop/merch.logs/duihuan/','title'=>'兑换记录'),
			array('url'=>'jy_creditshop/merch.logs/choujiang/','title'=>'抽奖记录'),
		)),
	)),
	array('title'=>'积分建仓','fa'=>'icon-dixiaofei','url'=>'jy_mjicai/merch.index/','child'=>array(
		array('title'=>'入口','child'=>array(
			array('url'=>'jy_mjicai/merch.index/','title'=>'概况'),
			array('url'=>'jy_mjicai/merch.jifen/','title'=>'积分统计'),
		)),
		array('title'=>'商品管理','child'=>array(
			array('url'=>'jy_mjicai/merch.goods/','title'=>'商品管理'),
			array('url'=>'jy_mjicai/merch.group/','title'=>'商品分类'),
			array('url'=>'jy_mjicai/merch.shopsetting/','title'=>'建仓商城设置'),
		)),
		array('title'=>'会员管理','child'=>array(
				array('url'=>'jy_mjicai/merch.member/','title'=>'会员管理'),
		)),
		array('title'=>'参与记录','child'=>array(
				array('url'=>'jy_mjicai/merch.canlog/','title'=>'参与记录'),
				array('url'=>'jy_mjicai/merch.jilog/','title'=>'参与收益'),
				array('url'=>'jy_mjicai/merch.tilog/','title'=>'提现记录'),
				array('url'=>'jy_mjicai/merch.feelog/','title'=>'信息记录'),
		)),
		array('title'=>'分销概况','child'=>array(
				array('url'=>'jy_mjicai/merch.agent.count/','title'=>'概况'),
				array('url'=>'jy_mjicai/merch.agent.list/','title'=>'分销商管理'),
				array('url'=>'jy_mjicai/merch.agent.apply/','title'=>'审核分销商'),
				//array('url'=>'jy_mjicai/merch.agent.order/','title'=>'分销订单'),
				array('url'=>'jy_mjicai/merch.agent.commission/','title'=>'收益明细'),
				array('url'=>'jy_mjicai/merch.agent.balance/','title'=>'结算管理'),	
		)),
		array('title'=>'团长概况','child'=>array(
				array('url'=>'jy_mjicai/merch.team.count/','title'=>'概况'),
				array('url'=>'jy_mjicai/merch.team.list/','title'=>'团长管理'),
				array('url'=>'jy_mjicai/merch.team.commission/','title'=>'团队建仓收益'),
		)),
	)),
	array('title'=>'链动1+2','fa'=>'icon-caifua','url'=>'jy_mshop2fee/merch.index/','child'=>array(
		array('title'=>'概况','child'=>array(
			array('url'=>'jy_mshop2fee/merch.index/','title'=>'概况'),
		)),
		array('title'=>'商品管理','child'=>array(
			array('url'=>'jy_mshop2fee/merch.goods/','title'=>'商品管理'),
			array('url'=>'jy_mshop2fee/merch.group/','title'=>'商品分类'),
			array('url'=>'jy_mshop2fee/merch.goodsfee/','title'=>'商品分润设置'),
			array('url'=>'jy_mshop2fee/merch.shopsetting/','title'=>'分销商城设置'),
		)),
		array('title'=>'运营管理','child'=>array(
			array('url'=>'jy_mshop2fee/merch.agent/','title'=>'代理管理'),
			array('url'=>'jy_mshop2fee/merch.member/','title'=>'会员管理'),
			array('url'=>'jy_mshop2fee/merch.apply/','title'=>'申请记录'),
			array('url'=>'jy_mshop2fee/merch.order/','title'=>'销售订单'),
			array('url'=>'jy_mshop2fee/merch.commission/','title'=>'分润管理'),
			array('url'=>'jy_mshop2fee/merch.balance/','title'=>'结算管理'),
		)),
		array('title'=>'参数设置','child'=>array(
			array('url'=>'jy_mshop2fee/merch.level/','title'=>'代理等级设置'),
			array('url'=>'jy_mshop2fee/merch.setting/','title'=>'基本设置'),
			array('url'=>'jy_mshop2fee/merch.apply_setting/','title'=>'代理申请页'),
			array('url'=>'jy_mshop2fee/merch.poster/','title'=>'代理二维码海报'),
		)),
	)),
	array('title'=>'商户会员','fa'=>'icon-form','url'=>'jy_merch/manage.member/','child'=>array(
		array('title'=>'会员','child'=>array(
			array('url'=>'jy_merch/manage.member/','title'=>'会员列表'),
			array('url'=>'jy_merch/manage.catefans/','title'=>'发展粉丝'),
		)),
		array('title'=>'记录','child'=>array(
			array('url'=>'jy_merch/manage.creditlog/','title'=>'充值消费记录'),
			array('url'=>'jy_merch/manage.msglog/','title'=>'消息记录'),
			array('url'=>'jy_merch/manage.feelog/','title'=>'红包记录'),
			array('url'=>'jy_merch/manage.paylog/','title'=>'支付流水'),
		)),
	)),
	array('title'=>'打印机','fa'=>'icon-print','url'=>'jy_merch/manage.printlist/','child'=>array(
		array('title'=>'打印机','child'=>array(
			array('url'=>'jy_merch/manage.printlist/','title'=>'默认打印机管理'),
			array('url'=>'jy_merch/manage.feiprintlist/','title'=>'飞蛾打印机管理'),
			array('url'=>'jy_merch/manage.printer/','title'=>'打印任务管理'),
			array('url'=>'jy_merch/manage.printer_tpl/','title'=>'打印机模板'),
			//array('url'=>'jy_merch/manage.printer_set/','title'=>'打印机设置'),
		)),
	)),
	array('title'=>'商户结算','fa'=>'icon-licai','url'=>'jy_lianmerch/manage.credit1log/','child'=>array(
		array('title'=>'商户积分','child'=>array(
			array('url'=>'jy_lianmerch/manage.credit1log/','title'=>'积分结算'),
			array('url'=>'jy_lianmerch/manage.credit4log/','title'=>'票结算'),
			array('url'=>'jy_lianmerch/manage.credit6log/','title'=>'R币结算'),
		)),
		array('title'=>'结算','child'=>array(
			array('url'=>'jy_merch/manage.ordergoods_list/','title'=>'待结算订单'),
			array('url'=>'jy_merch/manage.orderisgoods_list/','title'=>'已结算订单'),
			array('url'=>'jy_merch/manage.apply_list/status1','title'=>'待审核申请'),
			array('url'=>'jy_merch/manage.apply_list/status2','title'=>'待结算申请'),
			array('url'=>'jy_merch/manage.apply_list/status3','title'=>'已结算申请'),
			array('url'=>'jy_merch/manage.apply_list/status4','title'=>'无效申请'),
			array('url'=>'jy_merch/manage.apply_add/','title'=>'申请提现'),
		)),
	)),
	array('title'=>'商户设置','fa'=>'icon-shezhi','url'=>'jy_merch/manage.shop/','child'=>array(
		array('title'=>'设置','child'=>array(
			array('url'=>'jy_merch/manage.shop/edit','title'=>'基础设置'),
			array('url'=>'jy_mfuwu/manage.setting/','title'=>'服务小店设置'),
			array('url'=>'jy_merch/manage.level/','title'=>'经销等级'),
			array('url'=>'jy_merch/manage.shop/diy','title'=>'DIY装修小店'),
		)),
		array('title'=>'客服设置','child'=>array(
			array('url'=>'jy_merch/manage.kefu/','title'=>'客服设置'),
			array('url'=>'jy_merch/manage.kefus/','title'=>'客服列表'),
			
		)),
	)),
);
if(!$this->plugin_exists('jy_cashier')){
	unset($menus[7]);
}
if($_SESSION['merchid']){
	$groupid=pdo_getcolumn('jy_merch_user',array('id'=>$_SESSION['merchid'],'uniacid'=>$_SESSION['uniacid']),'groupid');
	if($groupid){
		$group=pdo_get('jy_merch_group',array('id'=>$groupid,'uniacid'=>$_SESSION['uniacid']),array('plugins','bankuai','menus'));	
		if(strpos($group['plugins'],';jy_merchjifee;') === false){
			unset($menus[8]['child'][1]);
		}
		if(strpos($group['plugins'],';jy_area_jifee;') === false){
			unset($menus[8]['child'][2]);
		}
		if(strpos($group['plugins'],';jy_mjicai;') === false){
			unset($menus[10]);
		}
		if(strpos($group['plugins'],';jy_bigwheel;') === false){
			$isnojy_bigwheel=1;
		}
		if(strpos($group['plugins'],';jy_bargain;') === false){
			$isnojy_bargain=1;
		}
		if(strpos($group['plugins'],';jy_pingdd_pin;') === false){
			$isnojy_pingdd_pin=1;
		}
		if(strpos($group['plugins'],';jy_mshop2fee;') === false){
			unset($menus[11]);
		}
	}
}
if(!$isnojy_bigwheel && $this->plugin_exists('jy_bigwheel')){
	$menus[6]['child'][]=array('title'=>'大转盘','child'=>array(
			array('url'=>'jy_bigwheel/merch.list/','title'=>'活动列表'),
	));
}
if(!$jy_bargain && $this->plugin_exists('jy_bargain')){
	$menus[6]['child'][]=array('title'=>'砍价活动','child'=>array(
			array('url'=>'jy_bargain/merch.list/','title'=>'活动列表'),
	));
}
if(!$jy_pingdd_pin && $this->plugin_exists('jy_pingdd_pin')){
	$menus[6]['child'][]=array('title'=>'拼团活动','child'=>array(
			array('url'=>'jy_pingdd_pin/merch.goods/','title'=>'拼单商品'),
			array('url'=>'jy_pingdd_pin/merch.team/list/status=100','title'=>'成团管理'),
			array('url'=>'jy_pingdd_pin/merch.order/list/status=100','title'=>'参与管理'),
			array('url'=>'jy_pingdd_pin/merch.refund/','title'=>'拼单退款'),
			array('url'=>'jy_pingdd_pin/merch.creditlog/','title'=>'参与返现'),
			array('url'=>'jy_pingdd_pin/merch.log/','title'=>'参与信息'),
	));
}
return $menus;